﻿@using Windvoice.Blog
@using Windvoice.Library.Mvc
@{
    ViewBag.Title = "Voices";
    Layout = "~/Areas/Manage/Views/Shared/_Layout.cshtml";
}


@section headSection{
    <script type="text/javascript">
        $(function () {
            $('a[data-delete]').click(function () { $(this).handledelete('/manage/voice/delete') });
        });
    </script>
}

<div class="pagetitle">
    <h2>Voices</h2>
    <div class="pagefunctions">
        @Html.ActionLink("创建Voice", "create")
    </div>    
</div>

<ul class="blog-list">
    @foreach (Voice voice in (Voice[])ViewBag.VoiceList)
    {
        <li>
            <div class="title">
                <div class="titlevalue">@voice.Author</div>
                <div class="operate">
                    <a href="/manage/voice/edit/@voice.ID">编辑</a>
                    <a href="javascript:;" data-delete="@voice.ID">删除</a>
                </div>
            </div>
            <div class="content">@voice.Content</div>
        </li> 
    }
</ul>

@Html.Pager((int)ViewBag.RecordCount,PageSize:(int)ViewBag.PageSize)